// 这个是开发测试文件
import hotkey from '../lib/index'

hotkey.addCMD('setBgColor', (color) => {
    document.body.style.backgroundColor = color;
});

hotkey.addHotkey({
    key: 'F1',
    ctrlKey: false,
    altKey: false,
    shiftKey: false,
    cmd: 'setBgColor("black")',
    des: '设置背景(black)'
});

hotkey.addHotkey({
    key: 'F2',
    ctrlKey: false,
    altKey: false,
    shiftKey: false,
    cmd: 'setBgColor("yellow")',
    des: '设置背景(yellow)'
});

// hotkey.removeHotkey(hotkey => hotkey.key === 'F1')
console.log(hotkey.getHotkeys());


hotkey.config.enable = true;
// hotkey.removeCMD('setBgColor');
hotkey.getCMDs()